load("@rules_cc//cc:defs.bzl", "cc_test")

_TESTS = {
    "test_7868": [],
    # Fails intentionally so not tested "test_9337": [], 
    "test_10631": [],
    # Fails intentionally so not tested "test_10778": [], 
    "test_11006": [], 
    "test_11012": [], 
    "test_12176": [],
}

[cc_test(
    name = test,
    srcs = glob(["{}.cpp".format(test)], exclude = ["**/win32_test.cpp"]),
    defines = select({
        "@platforms//os:windows": ["WIN32_LEAN_AND_MEAN=1"],
        "//conditions:default": [],
    }),
    deps = [
        "@boost.chrono",
        "@boost.test",
    ] + _TESTS[test],
) for test in _TESTS]

cc_test (
    name = "win32_test", 
    target_compatible_with = select({
        "@platforms//os:windows": [],
        "@platforms//os:macos": ["@platforms//:incompatible"],
        "//conditions:default": ["@platforms//:incompatible"],
    }), 
    srcs = 
    select({
        "@platforms//os:windows": glob([
            "**/win32_test.cpp"
        ]),
        "//conditions:default": [
        ],
    }),
    deps = [
        "@boost.chrono",
        "@boost.test"
    ]
)
